package vip.xiaonuo.sys.fymodule.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 退款日志
 * </p>
 *
 * @author wangy
 * @since 2025-06-23
 */
@Data
@TableName("sxo_refund_log")
@Schema(name = "SxoRefundLog对象", description = "退款日志")
public class SxoRefundLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "退款日志id")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @Schema(description = "支付id")
    @TableField("pay_id")
    private String payId;

    @Schema(description = "用户id")
    @TableField("user_id")
    private String userId;

    @Schema(description = "业务订单id")
    @TableField("business_id")
    private String businessId;

    @Schema(description = "业务类型，字符串（如：订单、钱包充值、会员购买、等...）")
    @TableField("business_type")
    private String businessType;

    @Schema(description = "支付平台交易号")
    @TableField("trade_no")
    private String tradeNo;

    @Schema(description = "支付平台用户帐号")
    @TableField("buyer_user")
    private String buyerUser;

    @Schema(description = "退款金额")
    @TableField("refund_price")
    private BigDecimal refundPrice;

    @Schema(description = "订单实际支付金额")
    @TableField("pay_price")
    private BigDecimal payPrice;

    @Schema(description = "描述")
    @TableField("msg")
    private String msg;

    @Schema(description = "支付方式标记")
    @TableField("payment")
    private String payment;

    @Schema(description = "支付方式名称")
    @TableField("payment_name")
    private String paymentName;

    @Schema(description = "退款类型（0原路退回, 1退至钱包, 2手动处理）")
    @TableField("refundment")
    private Integer refundment;

    @Schema(description = "请求参数（数组则json字符串存储）")
    @TableField("request_params")
    private String requestParams;

    @Schema(description = "支付平台返回参数（以json存储）")
    @TableField("return_params")
    private String returnParams;

    @Schema(description = "添加时间")
    @TableField("add_time")
    private String addTime;
}
